﻿using Caliburn.Micro;
using System;

namespace GetMan.Models
{
    public class DataModeModel : PropertyChangedBase
    {
        private string name;
        public string Name
        {
            get => name;
            set
            {
                name = value;
                NotifyOfPropertyChange(() => Name);
            }
        }
    }


    public static class CreateDataModel
    {
        public static BindableCollection<DataModeModel> CreateList(Type enumType)
        {
            var newList = new BindableCollection<DataModeModel>();
            var fields = Enum.GetValues(enumType);
            foreach (var field in fields)
            {
                newList.Add(new DataModeModel
                {
                    Name = field.ToString(),
                });
            }
            return newList;
        }
    }
}